import { foo, bar } from "./module.mjs";
console.log(foo, bar);
import fs from "fs";
// 系统内置模块
fs.writeFileSync(".foo.txt", "es module working");
// 可以提取内置模块!
import { writeFileSync } from "fs";
writeFileSync(".foo2.txt", "es module working");
// 第三方模块
import _ from "lodash";
console.log(_.camelCase("ES Module"));
// import { camelCase } from "lodash";
import pkg from "lodash";
const { camelCase } = pkg;
console.log(camelCase("ES Module"));
